package com.study.lxy.security.utils;

import org.junit.Test;

import java.security.SecureRandom;

public class SecureRandomTest {

    @Test
    public void secureRandom() throws Exception{

        SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
        byte[] bytes = new byte[20];
        for (int i = 0; i < 100 ; i++) {
            System.out.println(String.format("%06d", secureRandom.nextInt(1000000)));
        }
    }
}
